package com.wendy.job.errorcode;

import com.wendy.common.core.constant.HttpStatus;
import com.wendy.common.core.errcode.base.BaseError;

public class JobError extends BaseError {


    public static JobError ADD_CRON_ERROR = new JobError("新增任务%s失败，Cron表达式不正确", HttpStatus.ERROR);
    public static JobError ADD_RMI_ERROR = new JobError("新增任务%s失败，目标字符串不允许'rmi'调用", HttpStatus.ERROR);
    public static JobError ADD_LDAP_ERROR = new JobError("新增任务%s失败，目标字符串不允许'ldap(s)'调用", HttpStatus.ERROR);
    public static JobError ADD_HTTP_ERROR = new JobError("新增任务%s失败，目标字符串不允许'http(s)'调用", HttpStatus.ERROR);
    public static JobError ADD_CHAR_ERROR = new JobError("新增任务%s失败，目标字符串存在违规", HttpStatus.ERROR);
    public static JobError ADD_WHITE_ERROR = new JobError("新增任务%s失败，目标字符串不在白名单内", HttpStatus.ERROR);

    public static JobError EDIT_CRON_ERROR = new JobError("修改任务%s失败，Cron表达式不正确", HttpStatus.ERROR);
    public static JobError EDIT_RMI_ERROR = new JobError("修改任务%s失败，目标字符串不允许'rmi'调用", HttpStatus.ERROR);
    public static JobError EDIT_LDAP_ERROR = new JobError("修改任务%s失败，目标字符串不允许'ldap(s)'调用", HttpStatus.ERROR);
    public static JobError EDIT_HTTP_ERROR = new JobError("修改任务%s失败，目标字符串不允许'http(s)'调用", HttpStatus.ERROR);
    public static JobError EDIT_CHAR_ERROR = new JobError("修改任务%s失败，目标字符串存在违规", HttpStatus.ERROR);
    public static JobError EDIT_WHITE_ERROR = new JobError("修改任务%s失败，目标字符串不在白名单内", HttpStatus.ERROR);

    public static JobError EDIT_EXPIRE_ERROR = new JobError("任务不存在或已过期！", HttpStatus.ERROR);

    public JobError() {
        super();
    }
    public JobError(String msg, Integer code) {
        super(msg, code);
    }
}
